FROM ubuntu
MAINTAINER chris <haokang207@126.com>
WORKDIR /tmp
RUN apt-get update
RUN apt-get install -y curl
RUN curl -jksSLH "Cookie: oraclelicense=accept-securebackup-cookie" \
"http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/server-jre-8u181-linux-x64.tar.gz" | gunzip -c - | tar -xf - && \
mv jdk1.8.0_181/jre /usr/local/java
RUN rm -rf *.tar.gz
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y tzdata
RUN ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN sudo dpkg-reconfigure -f noninteractive tzdata
ENV JAVA_HOME=/usr/local/java
ENV PATH=${PATH}:${JAVA_HOME}/bin